<template>
	   <div>
			 <div class="deon-index" >
				 <!-- <div v-if="!isSwiTch" class="deon-index-size" :title="getName(datasize,1)">{{getName(datasize)}}</div> -->
					<vdrop 
						:setDatas="textData"
						:pulltype=1
						:value="radionButton"
						:isbook="isSwiTch"
						@updateEvent="updata"
						@canOffBack="canOffBacks"
						@conFirmBack="conFirmBacks"
						>
					</vdrop>
				</div>
				<!-- 按钮 -->
				<ul class="vdrop-commen-bot" >
					<li class="vdrop-commen-bot-sp1" @click="btnBook(false)">取消</li>
					<li class="vdrop-commen-bot-sp2" @click="btnBook(true)">确定</li>
				</ul>
		 </div>
</template>

<script>
import {mapGetters,mapState, mapMutations, mapActions} from 'vuex'
import  vdrop from '@/components/vdrop/vdrop.vue'
import axios from 'axios'

export default {
	name:"deomcome",
	data(){
		return{
			setDatas:[],//数据
			//datasize:"",
// 			isclass:[
// 				 activeClass:'iswidth',
// 			],
			isSwiTch:false,
			
		}
	},
	created () {
		this._getRecommend() 
	},
	methods: {
		_getRecommend() {//所有数据
			let shTime = JSON.parse(localStorage.getItem('vdeonData'))
			if(shTime&&shTime.length){
				this.$store.commit('deonjs/getPlace',shTime);
			}else{
				this.$store.dispatch('deonjs/getRemark');
				this.setDatas=this.textData
			}
		},
		updata(data){//fu
			if(data.pulltype===0){
				this.datasize=data.data
				this.$store.commit('deonjs/setUpdata',data);
			}
		},
		btnBook(isclook){
			this.isSwiTch=isclook
		},
		canOffBacks(){
			// console.log("我是取消")
		},
		conFirmBacks(data){
			console.log("我是确定",data)
		}
	},
	computed:{
		...mapState({
				textData:state => state.deonjs.textData,
				radionButton:state => state.deonjs.radionButton
			})
	},
	watch:{
		
	},
	components:{
		vdrop
  }
	
}

</script>

<style lang="scss" scoped >
	
	.deon-index{
		width: 280px;
		height: 30px;
		border-bottom: 1px solid #000;
		.deon-index-size{
			width: 100%;
			height: 30px;
			line-height: 30px;
			overflow: hidden;
			cursor: pointer;
		}
	}
	.vdrop-commen-bot{
		width: 100%;
		height: 34px;
		background: burlywood;
		display: flex;
		justify-content: space-around;
		align-items: center;
		position: fixed;
		right: 20px;
		bottom: 30px;
		li{
			display: block;
			width: 50px;
			height: 24px;
			text-align: center;
			font-size: 12px;
			line-height: 24px;
			&.vdrop-commen-bot-sp1{
				border: 1px solid royalblue;
			}
			&.vdrop-commen-bot-sp2{
				border: 1px solid #fff;
			}
		}
		
	}
	
</style>
